package com.yuanchu.search.client;

import feign.hystrix.FallbackFactory;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

/**
 * @version: 1.0
 * @Author: adan
 * @description:
 * @date: 2024-01-24 10:20
 */
@Slf4j
@Component
public class FeignOrderServiceClientFallbackFactory implements FallbackFactory<FeignOrderClient> {
    @Override
    public FeignOrderClient create(Throwable throwable) {
        throwable.printStackTrace();

        log.debug("调用订单服务发生熔断走降级方法,熔断异常:", throwable.getMessage());
        return null;
    }
}
